home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / comm2 / mmmltc80.lha / DOC / MM_MultiAction.doc
Text File  |  1996-04-25  |  9KB  |  365 lines

  1.  
  2. MM--------------------------------------------------------------------------
  3.   #    #  #    #  #      #####  #    ##     ####  #####  #   ####   #    #
  4.   ##  ##  #    #  #        #    #   #  #   #    #   #    #  #    #  ##   #
  5.   # ## #  #    #  #        #    #  #    #  #        #    #  #    #  # #  #
  6.   #    #  #    #  #        #    #  ######  #        #    #  #    #  #  # #
  7.   #    #  #    #  #        #    #  #    #  #    #   #    #  #    #  #   ##
  8.   #    #   ####   ######   #    #  #    #   ####    #    #   ####   #    #
  9. ----------------------------------------------------------------------------
  10.  
  11.                       (C) 1994-96 By Paolo Carotenuto
  12.  
  13.  
  14. MM_MultiAction answer the need for automated and intelligent file
  15. moving, allowing you to specify matching files and their disposition.
  16.  
  17. -------------
  18. Installation
  19. -------------
  20.  
  21. A section in the config file is denoted by the very first line,
  22. called the FOUND line, in which you specify the PATH and FILENAME
  23. of the files you wish to process.
  24.  
  25. This section continues until the keyword END is detected.
  26.  
  27.  
  28. Command Keyword
  29. ---------------
  30.  
  31. FOUND <arg>
  32.               Specifies the file(s) to search for AmigaDos wildcard 
  33.               characters may be used, thougn the pattern matching
  34.               functions are limited.
  35.  
  36.  
  37. Example:      FOUND In:Region33.ZIP
  38.               FOUND FILE:KilledFiles/#?
  39.  
  40.  
  41.  
  42.  
  43. IFSIZE <arg>
  44.               Cancels further operations within a section if the file
  45.               size of the file being acted on is less than specifed.
  46.  
  47.  
  48. Example:      IFSIZE 500000
  49.              
  50.  
  51.  
  52.  
  53. CHECKDATE <OldDays>
  54.  
  55.               It checks if the file is older than "OLDDAYS" and if yes
  56.               continues the scripts
  57.  
  58. Example:      FOUND LOGS:TpTCron.log
  59.               CHECKDATE 40
  60.               DELETE
  61.               END
  62.  
  63.  
  64.  
  65.  
  66. COMMENT <arg>
  67.               Places a comment into the filenote field of the file.
  68.               Accepts MM_MultiAction text Switches.
  69.               The comment should be surrounded by quotes.
  70.  
  71.  
  72. Example:      COMMENT [%NAME] in data: %DTTM
  73.  
  74.  
  75.  
  76.  
  77. DELETE        Deletes the file.
  78.  
  79.  
  80. Example:      DELETE
  81.  
  82.  
  83.  
  84.  
  85. RENAME <arg>  
  86.               Renames the file. Keep in mind that you may have been
  87.               searching for names with wildcards, and if this search
  88.               found 3 files, attempt to rename them amy fail if not
  89.               done carefully. Accpets MM_MultiAction text switches.
  90.  
  91. Example:      RENAME NodeDiff.zip
  92.  
  93.  
  94.  
  95.  
  96.  
  97. COPY <arg>    
  98.               Copies the file(s) to specified path and filename.
  99.               Accepts MM_MultiAction text switches.
  100.               If destination file already exists, rather the
  101.               destination filename will be renamed by adding a
  102.               comma and counter to the end of the name.
  103.  
  104.  
  105. Example:      COPY ODD:
  106.               COPY FH0:NodeDiff.zip
  107.  
  108.  
  109.  
  110.  
  111. MOVE <arg>
  112.               Move the file(s) to specified path and filename.
  113.               If destination file already exists, rather the
  114.               destination filename will be renamed by adding a
  115.               comma and counter to the end of the name.
  116.  
  117. Example:      MOVE DH1:TKilled/
  118.  
  119.  
  120.  
  121.  
  122.  
  123. SCRIPT <ScriptCommand> ["Switchs"]
  124.  
  125.               This command executes <ScriptName> and, optionally,
  126.               you may pass additional arguments simply by specifying
  127.               them. Accpets MM_MultiAction text switches.
  128.               ** REMEMBER To include any switch bet when quotes.
  129.  
  130. Example:      SCRIPT FIDO:Batch/ProcessDiff.Batch "%NAME"
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CLICMD <CliCommand> [Switchs]
  137.  
  138.               This command executes a CLI Command <CliCommand> and,
  139.               optionally, you may pass additional arguments simply
  140.               by specifying them. Accpets MM_MultiAction text switches.
  141.  
  142. Example:      CLICMD Delete %PATH
  143. Example:      CLICMD TrapList
  144.  
  145.  
  146.  
  147.  
  148.  
  149. HATCH <TagName> <"Desc"> [<Replace>]
  150.               This command Hatches the file into <TagName> with the
  151.               <"Description">. Use the <Replace> function to replace
  152.               old file name. Accpets MM_MultiAction text switches
  153.  
  154.  
  155. Example:      HATCH REGION "FidoNet Nodelist" REGION33.ZIP
  156.  
  157.  
  158.  
  159.  
  160.  
  161. DAY [day [day]...]
  162.               Unlike other command keywords, this on doesn't
  163.               belog inside a section of commands. Also, this
  164.               keyword's arguments alters the operation of all
  165.               other sections below it, until it is changed again.
  166.               DAY allows you to specify on which days the following
  167.               sections are to run.
  168.  
  169.               SUNDAY     = 0
  170.               MONDAY     = 1
  171.               TUESDAY    = 2
  172.               WEDNESDAY  = 3
  173.               THURSDAY   = 4
  174.               FRIDAY     = 5
  175.               SATURDAY   = 6
  176.  
  177. Example:      DAY 0           Sunday Only
  178.               DAY 0 2 4       Sunday, Tuesday, Thursday
  179.  
  180.  
  181.  
  182.  
  183. END           End of sequence.
  184.  
  185.  
  186.  
  187.  
  188.  
  189. NOTIFY <TagName> <User_Name> <"Message">
  190.           
  191.             This command send a message to <user> in area <TagName>
  192.             and say <"Message"> about the file.
  193.             <User> is any valid UserName while <"Message"> is a text
  194.             which may contain MM_MultiAction text switches.
  195.    
  196. Example:    NOTIFY NetMail Paolo_Carotenuto "The file %NAME was found in BAD_DIR"
  197. Example:    NOTIFY MMBETA  ALL  "Last Version of %NAME"
  198.  
  199.  
  200.  
  201.  
  202.  
  203. EVENTLOG <who> <"what"> (Only for DLG Users)
  204.  
  205.               This command works  identically to the NOTIFY above, except
  206.               that instead of sending a message, a notation is made to the            
  207.               users's eventlog.
  208.  
  209. Example:      EVENTLOG Salvatore_Viglietti "The file %NAME is present on BBs"
  210.  
  211.  
  212.  
  213.  
  214. -----------------------------
  215. MM_MultiAction text switches
  216. -----------------------------
  217.  
  218. The following switches are recognized by MM_MultiAction:
  219. --------------------------------------------------------
  220.  
  221. %NAME   -    Filename Only
  222. %PATH   -    Path and FileName
  223. %SIZE   -    Size of file
  224. %DATE   -    Date
  225. %TIME   -    Time
  226. %DTTM   -    Date and Time
  227.  
  228.  
  229.  
  230.  
  231. -------------------------
  232. Some Practical Examples.
  233. -------------------------
  234.  
  235. Finding Damaged Mail Packets.
  236. -----------------------------
  237. You might like to be notified whenever Mail Manager detects a damaged
  238. mail packet. This works nicely for that purpose:
  239.  
  240. FOUND OUT:BAD/#?
  241. EVENTLOG Paolo_Carotenuto "The file %NAME is present on BAD_DIR"
  242. COMMENT File Found %DTTM
  243. END
  244.  
  245.  
  246. Processing The Nodediff.
  247. ------------------------
  248. With the ability to detect the nodelist and run a script file, it's
  249. no loger necessary to set up a CronTab entry to process the nodelist.
  250.  
  251. FOUND IN:NODEDIFF.???
  252. EVENTLOG Paolo_Carotenuto "%NAME found and Processed..."
  253. COPY Nodelist:
  254. SCRIPT FIDO:Batch/ProcessDiff.Batch "%NAME"
  255. END
  256.  
  257. FOUND IN:AMYDIFF.???
  258. EVENTLOG Paolo_Carotenuto "%NAME found and Processed..."
  259. COPY Nodelist:
  260. SCRIPT FIDO:Batch/ProcessDiff.Batch "%NAME"
  261. END
  262.  
  263.  
  264. ProcessDiff.Batch
  265. --------------------------------
  266. .Key File/A
  267. .Bra {
  268. .Ket }
  269.  
  270. Echo {file}
  271.  
  272. failat 200
  273.  
  274. CD Nodelist:                    
  275. RX FIDO:REXX/UNARX.REXX {File}  
  276. Traplist                        
  277. Delete {File}                   
  278. ---------------------------------
  279.  
  280.  
  281. Removing Downloaded Message bundles.
  282. ------------------------------------
  283. Ever get annoyed that DLG moves the User's killed-off DLGMSGS.#?
  284. files into FILE:KILLEDFILES/DLGMSGS.#?
  285.  
  286. FOUND FILE:KilledFiles/DLGMSGS.#?
  287. DELETE
  288.  
  289.  
  290. Tidying Up FILE:KilledFiles.
  291. ----------------------------
  292. Here's a way to keep the accumulation of killed files down to a much
  293. smaller number. Utilizing the DAY feature, on Monday through Saturday
  294. any files found in FILE:KilledFiles are moved to Another Directory.
  295. You are notified, and can take steps to examine them if you wish.
  296. On Sunday, all the files in this other directory are deleted.
  297.  
  298. DAY 1 2 3 4 5 6 
  299. FOUND FILE:KilledFiles/#?
  300. EVENTLOG  Paolo_Carotenuto "Moving %NAME (%SIZE Butes) to TKilled"
  301. MOVE DH1:TKilled/
  302. END
  303.  
  304. DAY 0
  305. FOUND DH1:TKilled/#?
  306. EVENTLOG  Paolo_Carotenuto "Deleting %NAME (%SIZE Butes) from TKilled"
  307. DELETE
  308. END
  309.  
  310.  
  311. Watching from accumulated Outbound Mail Bundle.
  312. -----------------------------------------------
  313. I like to know when mail piles up for other nodes, and be informed.
  314. Since this routine can be executed over and over again, and report
  315. the same things over and over again, limit its use to a single day.
  316. Expect to be informed  many times, as well....
  317.  
  318. You will be informed of any files in your OutBound: which are about
  319. a megabyte.
  320.  
  321. DAY 0
  322. FOUND OUT:Bundles/#?
  323. IFSIZE 1000000
  324. EVENTLOG  Paolo_Carotenuto "OUTBOUND:%NAME excedes 1 megabytes"
  325. END
  326.  
  327. Hatching Files.
  328. ---------------
  329. Good for HUB, to send files on to other systems in Fidonet.
  330.  
  331. FOUND IN:PList#?
  332. NOTIFY NETMAIL Paolo_Carotenuto "%NAME Trovata ed Hatchata..."
  333. HATCH PLIST "AutoHatch of PointList" 
  334. DELETE
  335. END
  336.  
  337.  
  338. Cli Command.
  339. ------------
  340. Use this command for every use you want. :-))
  341.  
  342. FOUND Nodelist:region.033
  343. CLICMD FIDO:Trap/TrapList
  344. CLICMD Delete %PATH
  345. END
  346.  
  347.  
  348.  
  349. * HOW TO CONTACT THE AUTHOR
  350. ---------------------------
  351.  
  352. You can contact Me at one of the following addresses.
  353.  
  354.  Paolo Carotenuto - E-Mail: apunet@mbox.vol.it
  355.  
  356.  FidoNet 2:335/202.0   - 2:335/228.0
  357.  AmigaNet 39:102/101.0 - 39:102/107.0
  358.  
  359.  ** This Programm is CardWare,  Please send your postcard to:
  360.  
  361.     Paolo Carotenuto
  362.     IV Trav. Perrone Capano 53/a
  363.     80126 - Pianura
  364.     Napoli ( Italy )
  365.